package com.app.pojo;

import java.io.File;
import java.util.ArrayList;

public class FileListResult {
    private ArrayList<FileInfo> list=new ArrayList<>();
    private int status;
    public void put(String filepath){
//        list.add(filepath);
    }
    public void addAll(File[] fileList){
        for (File f:fileList) list.add(new FileInfo(f));
    }
    public FileListResult(int status) {
        this.status = status;
    }
    public FileListResult(int status,File[] fileList) {
        this.status = status;
        addAll(fileList);
    }
    public FileListResult(int status,ArrayList<FileInfo> list) {
        this.status = status;
        this.list = list;
    }

    public ArrayList<FileInfo> getList() {
        return list;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "FileListResult{" +
                "list=" + list +
                ", status=" + status +
                '}';
    }

}
